<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
		<!--[if lte IE 6]></base><![endif]-->

		<title>广东科学技术职业学院考生报到系统<s:property value="%{#session.college.collegesName}"/></title>

		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
		<meta http-equiv="description" content="This is my page"/>
		<link href="css/newindex.css" rel="stylesheet" type="text/css" />
		<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
		<script src="js/jquery-1.5.js" language="javascript">
</script>
		<script src="js/newpublic.js" language="javascript">
</script>
		<script src="js/table.js" language="javascript">
</script>
		<script src="js/jquery-ui-1.8.5.custom.min.js" language="javascript">
</script>

		<script language="javascript" type="text/javascript"
			src="js/jquery.flot.js">
			
</script>

		<!--                     下面是柱状图所要用到的两个文件         -->

		<script language="javascript" type="text/javascript"
			src="js/Bar-chart.js">
</script>

		<!-- 下面是饼图所要用到的两个文件 -->
		<script type="text/javascript" src="js/jquery.flot.pie.min.js">
</script>
		<script type="text/javascript" src="js/Pie-chart.js">
</script>


<script language="javascript">

var collegeRegisterBarchart = new BarChart();
var collegePaymentBarchart = new BarChart();
var schoolRegisterBarchart = new PieChart();
var schoolPaymentBarchart = new PieChart();
var index;
	function s(s) {
		for ( var i = 1; i <= 4; i++)
			$('#t' + i).css('display', 'none');
		$('#t' + s).css('display', 'block');
		index = s;

		updateData(index)
	}

	$(function() {

		$("#content").draggable({cancel:".contable"});
		//动态加载logo
		$("#content .subjectlogo").css("background-image","url(<%=basePath%>/newimages/${sessionScope.college.collegeLogo})");
		
		index = 1;
		$.post("json/schoolSelectQueryChartAction!queryProfessionName", function(data) {
			$("#collegeName").html(data.collegeName);
		})
		updateData(index)
	})

	function update(){
		updateData(index)
	}

	function updateData(index){
		switch(index) {
			case 1:
				$.post("json/schoolSelectQueryChartAction!schoolRegRate", {date : new Date()}, function(data) {
					schoolRegisterData = eval("(" + data.schoolRegBars + ")");
					schoolRegisterBarchart.buildPieChart($("#placeholderForBars"),schoolRegisterData,null);
				})
				break;
			case 2:
				$.post("json/schoolSelectQueryChartAction!schoolPaymentRate", {date : new Date()}, function(data) {
					schoolPaymentData = eval("(" + data.schoolPaymentBars + ")");
					schoolPaymentBarchart.buildPieChart($("#placeholderForBars2"),schoolPaymentData,null);
				})
				break;
			case 3:
				$.post("json/schoolSelectQueryChartAction!collegeRegRate", {date : new Date()}, function(data) {
					collegeRegisterData = eval("(" + data.collegeRegBars + ")");
					collegeRegisterBarchart.buildBarsChart($("#placeholderForBars3"), $("#lengendForBars3"), collegeRegisterData);
				})
				break;
			case 4:
				$.post("json/schoolSelectQueryChartAction!collegePaymentRate", {date : new Date()}, function(data) {
					collegePaymentData = eval("(" + data.collegePaymentBars + ")");
					collegePaymentBarchart.buildBarsChart($("#placeholderForBars4"), $("#lengendForBars4"), collegePaymentData);
				})
				break;
			}
	}


</script>



	</head>

	<body onload="fixPNGAll()">
		<jsp:include page="common_head.jsp" />
				<div id="content">
					<!--当前位置CSS-->
					<div class="top">
						<div class="topleft">
							<div class="dan">
								<div>
									当前位置>招生概况>专业概况
								</div>
							</div>
							<div class="F5">
								<img src="newimages/F5.png" />
							</div>
						</div>
						<div class="topright">
							<div class="toprightmin"></div>
							<div class="toprightmax"></div>
							<div class="toprightclose" onclick="if(confirm('是否确定退出！')){location.replace('loginoutAction')}" title="点击退出"></div>
						</div>
					</div>
					<!---->
					<!--内容-->
					<div class="condiv">
						<div class="subjectlogo">
							<!--每学院Logo-->
							<div class="submenu">
								<ul>
									<li>
										<a href="scoreStatisticsAction">成绩统计</a>
									</li>
									<li>
										<a href="professionSelectAction">专业概况</a>
									</li>
									<li>
										<a href="yardSelectAction">院级概况</a>
									</li>
									<li>
										<a href="schoolSelectAction">校级概况</a>
									</li>
								</ul>
							</div>
							<div class="contable">
								<div class="contable">
									<div class="title">
										校级概况
									</div>
									<!-- 表格从数据库读数据 -->
									
								
										<table width="80%" border="0" align="center" cellpadding="1" cellspacing="5">
											<tr><td width="85%"></td></tr>
											<tr>
											<td width="15%" align="right">
													<input name="" type="button" value="刷新" onclick="update()" />
											</td>
											</tr>
										</table>
										
										
									<table width="637" border="0" align="center" cellpadding="1"
											cellspacing="5" class="table">
										
										<tr>
											<td width="112" align="center" style="font-size: 16px;">
												<a href="javascript:s(1)">学校报到率</a>
											</td>
											<td width="111" align="center" style="font-size: 16px;">
												<a href="javascript:s(2)">学校缴费率</a>
											</td>
											<td width="109" align="center" style="font-size: 16px;">
												<a href="javascript:s(3)">各学院报到率</a>
											</td>
											<td width="119" align="center" style="font-size: 16px;">
												<a href="javascript:s(4)">各学院缴费率</a>
											</td>
											
										</tr>
										
									</table>


									<div id="t1">
									<table width="80%" border="0" align="center" cellpadding="1"
										cellspacing="5">
											<tr>
												<td style="font-size: 12px; color: red;">
													&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新生总体报到率
												</td>
											</tr>
											<tr>
											<td align="center">
												<div style="width: 90%">
												<div id="placeholderForBars" style="width: 380px; height: 350px;"></div>
											</div>
											</td>
										</tr>
									</table>
									</div>


									<div id="t2" style="display: none;">
									<table width="80%" border="0" align="center" cellpadding="1"
										cellspacing="5">
										<tr>
											<td style="font-size: 12px; color: red;">
												&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新生总体缴费率
											</td>
										</tr>
										<tr>
											<td align="center">
											<div style="width: 90%">
												<div id="placeholderForBars2" style="width: 380px; height: 350px;"></div>
											</div>
											</td>
										</tr>
									</table>
									</div>



									<div id="t3" style="display: none;">
									<table width="88%" border="0" align="center" cellpadding="1" cellspacing="5">
										<tr>
											<td style="font-size: 12px; color: red;">
												&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;各学院报到率
											</td>
										</tr>
										<tr>
											<td align="center">
											<div style="width: 99%;height:300px;padding-left:20px;">
												<div id="placeholderForBars3" style="width:600px; height: 300px; float: left;"></div>
												<div id="lengendForBars3" style="float:left; width: 140px;"></div>
											</div>
											</td>
										</tr>
									</table>
									</div>

									<div id="t4" style="display: none;">
									<table width="88%" border="0" align="center" cellpadding="1"
										cellspacing="5">
										<tr>
											<td style="font-size: 12px; color: red;">
												&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;各学院缴费率
											</td>
										</tr>
										<tr>
											<td align="center">
												<div style="width: 100%;height:300px;padding-left:20px;">
												<div id="placeholderForBars4" style="width: 600px; height: 300px; float: left;"></div>
												<div id="lengendForBars4" style="float:left; width: 150px"></div>
											</td>
										</tr>
									</table>
									</div>
									<!-- 表格从数据库读数据结束 -->
								</div>
							</div>
						</div>
					</div>
					<!---->

					<!---->
					<div class="condiv"
						style="width: 997px; position: relative; height: 20px; min-height: 20px; text-align: center;">
						<a href="computer/computer.html" target="_blank">计算机学院程序员之家</a>
					</div>
					<!---->

					<!--低部-->
					<div class="bottom">
						&nbsp;
					</div>
					<!---->
				</div>
			</div>
		</div>

	</body>

</html>
